Skip to content

Add reusable Nix flake outputs and CI validation#8

Open
cdenneen wants to merge 1 commit intofluxcd:mainfrom
cdenneen:main
Open

Add reusable Nix flake outputs and CI validation#8
cdenneen wants to merge 1 commit intofluxcd:mainfrom
cdenneen:main

Conversation

@cdenneen
Copy link
Copy Markdown

Summary

This PR adds a minimal, generic Nix flake for fluxcd/agent-skills so consumers can use this repository directly as a flake input, without custom wiring.

What’s included

  • Add flake.nix with dynamic discovery of:
    • skills/* directories containing SKILL.md
    • agents/* profile directories
  • Expose reusable module outputs:
    • homeManagerModules.default
    • nixosModules.default
    • darwinModules.default
  • Keep installer app support for nix run:
    • default target (.agents/skills)
    • tool targets (codex, claude-code, gemini, kiro)
    • explicit --target, --copy, --force, --list
  • Add flake.lock
  • Update README with:
    • direct nix run usage
    • flake-input usage examples for Home Manager, NixOS, and nix-darwin
  • Add CI workflow .github/workflows/nix-flake.yaml validating:
    • flake outputs
    • installer smoke behavior
    • consumer-eval paths for Home Manager / NixOS / nix-darwin

Design goals

  • Keep implementation small and maintainable for upstream
  • Auto-include newly added skills without hardcoded lists
  • Validate consumer paths in CI

Validation performed

  • nix flake show --all-systems
  • nix eval .#lib.skillNames
  • nix eval .#lib.agentProfileNames
  • nix run .#install -- --target <tmp>
  • nix run .#install -- --tool codex --target <tmp>
  • Consumer evals via temporary test flakes for:
    • Home Manager
    • NixOS
    • nix-darwin

Notes

  • This PR intentionally avoids provider-specific CI cache auth requirements to keep contributor CI portable.

Signed-off-by: Chris Denneen <cdenneen@gmail.com>
Comment thread flake.nix
claude-code = ".claude/skills";
gemini = ".gemini/skills";
gemini-cli = ".gemini/skills";
gemeni = ".gemini/skills";
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this a typo gemeni?

Comment thread README.md
nix run github:fluxcd/agent-skills#install
```

Install for a specific tool path:
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's move all of this to docs/nix-setup.md and in here just have the above command and like to the doc for more info.

@stefanprodan stefanprodan requested a review from stealthybox April 1, 2026 12:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants